﻿Public Class KeyedViewModelBase
    Inherits ViewModelBase

    Private mKey As Guid = Guid.NewGuid
    ''' <summary>
    ''' Views should bind to this key if it needs to uniquely communicate with a specific view
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property Key As Guid
        Get
            Return mKey
        End Get
    End Property

    Public Sub SendMessage(message As MessageBase)
        MessageService.Instance.SendMessage(Me, message)
    End Sub

    Public Sub BroadcastMessage(message As MessageBase)
        MessageService.Instance.BroadcastMessage(message)
    End Sub
End Class
